package com.todoclipse.main;

import java.util.List;

import com.todoclipse.api.ProjectItem;
import com.todoclipse.common.DaoException;
import com.todoclipse.dao.DaoFactory;
import com.todoclipse.dao.ItemDao;
import com.todoclipse.dao.UserDao;

public class Main {
	
	public static void main(String[] args) {
		DaoFactory daoFactory = DaoFactory.getInstance();
		UserDao userDao = daoFactory.getUserDao();
		try {
//			manager.userRegister("todoclipse@o2.pl", "todoclipse", "Test",TimeZone.getDefault());
			String token = userDao.userLogin("todoclipse@o2.pl", "todoclipse");
			System.out.println(token);
			ItemDao itemDao = daoFactory.getItemDao(token);
			List<ProjectItem> allProjects = itemDao.getAllProjects();
			System.out.println(allProjects);
			System.out.println(userDao.getTimezones());
		} catch (DaoException e) {
			e.printStackTrace();
		}
	}

}
